﻿using System;
using System.Runtime.Remoting;
using System.ServiceProcess;

namespace MyLib.ViewStateServer {
	/// <summary>
	/// 
	/// </summary>
	static class Program {
		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		static void Main() {
			ServiceBase[] ServicesToRun;
			ServicesToRun = new ServiceBase[] 
			{ 
				new MainService() 
			};

			RemotingConfiguration.RegisterWellKnownServiceType(
				typeof(MyLib.Web.ViewStatePersister),
				"ViewState.rem",
				WellKnownObjectMode.Singleton);

			DataAdapter.Initialize();

			ServiceBase.Run(ServicesToRun);
		}
	} // end of Program.
}
